package com.smxpt.Dao;

import com.smxpt.Dao.Impl.UserDaoImpl;

public class JDKTest {
    public static void main(String[] args) {
        //1.创建代理对象
        MyProxy myProxy = new MyProxy();
        //2.创建目标对象
        UserDao userDao = new UserDaoImpl();
        //3.执行代理对象的createProxy方法进行目标对象的增强处理
        UserDao userDao1 = (UserDao) myProxy.createProxy(userDao);
        //4.执行增强处理后的目标对象的两个方法
        userDao1.addUser();
        userDao1.deleteUser();
    }
}
